<?
die("ok");
set_time_limit(1000);

require_once("../config/dbconn.php");require_once("../config/powercls.php");

if (!$test) $test=1;

$sql="select * from {$db_prefix}users where state=1 and iskong=0 and isok=0 order by id asc limit 20";
$result=$db->query($sql);
if ($db->num_rows($result)==0) die("ok了");
while($rs=$db->fetch_array($result)){
	echo $rs['username']."<bR>";
	$username=$rs['username'];$curuserid=$rs['id'];
	$regpv=$rs['regpv'];$tjuser=$rs['tjuser'];$bduser=$rs['bduser'];
	$curtime=$rs['confirmtime'];
	//推进啊关系
	/*$sqlgx="select * from {$db_prefix}tjgx where userid='".$rs['id']."'";
	$rsgx=$db->get_one($sqlgx);
	$tjstr=$rsgx['tjstr'];*/
	if (trim($tjuser)){
		$hytjupstr='';
		gettjupstrfunc(trim($tjuser),1,$glo_gljdai3_3);
		if ($hytjupstr!=''){
			$tjstr=$hytjupstr;
			require("../entera11.php");
		}
	}
	//更新
	$sqlgx="update {$db_prefix}users set isok=1 where id='".$rs['id']."'";
	$db->query($sqlgx);
}
$db->free_result($result);

echo "ok";
$test++;
echo "<script>location.href='test.php?test={$test}';</script>";exit();
?>